package com.qdaily.ui.net.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created with IntelliJ IDEA.
 * User: Felix
 * Date: 3/30/15
 * Time: 17:52
 * QQ:74104
 * Email:lovejiuwei@gmail.com
 */
public class ArticleInfoShare implements Parcelable {
    private String url = "";
    private String title = "";
    private String text = "";
    private String image = "";

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.url);
        dest.writeString(this.title);
        dest.writeString(this.text);
        dest.writeString(this.image);
    }

    public ArticleInfoShare() {
    }

    private ArticleInfoShare(Parcel in) {
        this.url = in.readString();
        this.title = in.readString();
        this.text = in.readString();
        this.image = in.readString();
    }

    public static final Parcelable.Creator<ArticleInfoShare> CREATOR = new Parcelable.Creator<ArticleInfoShare>() {
        public ArticleInfoShare createFromParcel(Parcel source) {
            return new ArticleInfoShare(source);
        }

        public ArticleInfoShare[] newArray(int size) {
            return new ArticleInfoShare[size];
        }
    };

    @Override
    public String toString() {
        return "ArticleInfoShare{" +
                "url='" + url + '\'' +
                ", title='" + title + '\'' +
                ", text='" + text + '\'' +
                ", image='" + image + '\'' +
                '}';
    }
}
